if (TV_BUILD_AVSCOLOR AND NOT WIN32)
    set(NAME termcolor)
    find_library(AVISYNTH avisynth)
    if (AVISYNTH)
        add_library(${NAME} SHARED ${NAME}.cpp)
        target_compile_features(${NAME} PRIVATE cxx_std_11)
        target_link_libraries(${NAME} PRIVATE ${PROJECT_NAME})

        find_path(AVISYNTH_INCLUDE "avisynth/avisynth.h")
        if (AVISYNTH_INCLUDE)
            target_include_directories(${NAME} PRIVATE "${AVISYNTH_INCLUDE}/avisynth")
        endif()
        target_link_libraries(${NAME} PRIVATE ${AVISYNTH})
        tv_set_output_dir(${NAME})
    else()
        tv_message(ERROR "Cannot find AviSynth.")
    endif()
endif()
